<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>
    class Parent{
        constructor(m){
            this.msg = m
        }
        show(){
            console.log(this.msg);
        }
        init(){
            console.log("init");
        }
    }

    class Child extends Parent{
        constructor(m){
            super(m);
        }
    }

    const p = new Parent("hello")
    console.log(p)
    p.show()
    p.init()
    
    const c = new Child("world")
    console.log(c)
    c.show()
    c.init()


    // 父类

    // 子类

    // 父类是子类的超类

</script>
</html>